Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 1.33 KB

Install with Docker.adoc

File metadata and controls

38 lines (25 loc) · 1.33 KB

Install with Docker (Recommended)

Setup

Qanary components cannot access the question from the knowledge graph when they are run in Docker containers and the pipeline is started via localhost. The problem is that the Qanary pipeline carries localhost as an address in the Qanary message object, which is not accessible in the Docker container.

To solve this issue, we recommend adding an entry to the hosts file:

127.0.0.1 qanary-pipeline

Optionally you can add the components for an easiear development experience, run the following script:

npm install dotenv
node -r dotenv/config -e 'console.log(`\n`+Object.entries(process.env).filter(([key]) => key.match(/^(SPRING|RASA|ACTION|FRONTEND)(.*)NAME$/)).map(([, value]) => `127.0.0.1 ${value}`).join(`\n`));' >> ./hosts
sudo sh -c 'cat ./hosts >> /etc/hosts'

This script adds all components/services used in this project to the /etc/hosts file. With this change the Qanary pipeline can be reached at http://qanary-pipeline:40111 instead of localhost.

Build the image

  • Run npm run docker:build to build the needed docker image of the repo.

Start the applications

  • Run npm run docker:up to start all services

Stop the applications

  • Run npm run docker:down to stop all services